package com.healthcloud.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.healthcloud.entity.BusInstrumentEntity;


public interface BusInstrumentDao extends BaseDao<BusInstrumentEntity> {
	
    int logicalDelete(@Param("id") Integer id);
    BusInstrumentEntity searchById(@Param("id") Long id);
    int deleteInstr(@Param("id") int id);
	List<BusInstrumentEntity> searchByName(
			@Param("instrumentType") String instrumentType,
			@Param("offset") String offset,
			@Param("limit") String limit,
			@Param("hospId") Long hospId );
	int countByName(@Param("instrumentType") String instrumentType, @Param("hospId") Long hospId);
	int updateStatus(@Param("entity") BusInstrumentEntity entity);
	List<BusInstrumentEntity> findSNByIdCard(@Param("entity") BusInstrumentEntity entity);
	List<BusInstrumentEntity> listByUserId(@Param("userId") Long userId);
	int updateIdCard(@Param("entity") BusInstrumentEntity entity);
	BusInstrumentEntity getBySnAndIdCard(@Param("sn") String sn, @Param("idCard") String idCard);
	List<String> getOpenID(String mKMedicalinstrumentId );

	/**
	 * 修改病人身份证号
	 * @param oldIdCard 修改前身份证号
	 * @param newIdCard 修改后身份证号
	 */
	void updatePatientIdCard(@Param("newIdCard") String newIdCard, @Param("oldIdCard") String oldIdCard);
}